Note that the ID, LANG and CLASS attributes can be used with virtually all of the elements permitted in the document body.
The body of an HTML document contains all the information which is part of the document, arranged in the order in which it is presented to the reader. Specifically, the body of a document may contain links, text, and formatting information within <BODY> and </BODY> tags.
These elements may be included in the body of an HTML document:
The ADDRESS element specifies such information as address, signature and authorship, often at the top or bottom of a document.
Typically, an address element is italic and may be indented. The ADDRESS element implies a paragraph break.
Example:
<ADDRESS> Newsletter editor<BR> J.R. Brown<BR> JimquickPost News, Jumquick, CT 01234<BR> Tel (123) 456 7890 </ADDRESS>
A section of text which forms the start and/or destination of a hypertext link is called an "anchor" and is defined by the <A> tag.
<A HREF="http://www.hal.com">HaL Computer Systems</A>
The most common attributes of the <ANCHOR> tag are:
If the HREF attribute is present, the anchor is sensitive text: the start of a link. If the reader selects this text, (s)he moves to another document whose network address is defined by the value of the HREF attribute.
The format of the network address is specified in the URI specification for print readers. With the HREF attribute, the form HREF="#identifier" can refer to another anchor in the same document. If the anchor is in another document, the attribute may be a relative name (relative to the document's address or the specified base address).
If present, the attribute NAME allows the anchor to be the destination of a link. The value of the attribute is an identifier for the anchor.
Identifiers are arbitrary strings but must be unique within the HTML document. Another document can then make a reference explicitly to this anchor by putting the identifier after the address, separated by a hash sign.
The TITLE element is informational only. If present the TITLE attribute should provide the title of the document whose address is given by the HREF attribute. This is useful for at least two reasons:
The browser software may chose to display the title of the document prior to retrieving it, for example as a margin note or on a small box while the mouse is over the anchor, or during document fetch.
Some documents -- mainly those which are not marked up text, such as graphics, plain text and also Gopher menus, do not come with a title themselves, and so putting a title in the link is the only way to give them a title. Obviously it leads to duplication of data, and so it is dangerous to assume that the title attribute of the link is a valid and unique title for the destination document.
If present, the URN attribute specifies a uniform resource name (URN) for the document. URNs allow a document to be recognized if duplicate copies are found. This prevents a client implementation from picking up a copy of something it already has.
The format of URNs is under discussion (1993) by various working groups of the Internet Engineering Task Force.
The METHODS attributes of anchors and links provide information about the functions which the user may perform on an object. These are more accurately given by the HTTP protocol when it is used, but it may, for similar reasons as for the TITLE attribute, be useful to include the information in advance in the link. For example, the browser may chose a different rendering as a function of the methods allowed (for example something which is searchable may get a different icon).
The value of the METHODS attribute is a comma separated list of HTTP methods supported by the object for public use.
Although all attributes are optional, either NAME or HREF is necessary for the anchor to be useful. Example:
See <A HREF="http://www.hal.com/">HaL</A>'s information for more details. <A NAME=INDECENT>Indecent</A> dress is defined as dress which the community finds offensive. The restaurant may refuse service to anyone who is <A HREF="#INDECENT">indecently</A> dressed.
The BLOCKQUOTE or BQ element allows text quoted from another source to be rendered in a particular way.
A typical rendering might be a slight extra left and right indent, and/or italic font. BQ causes a paragraph break, and typically provides a line or so of white space before and after the quote.
Single-font rendition may reflect the quotation style of Internet mail by putting a vertical line of graphic characters (such as the greater than symbol ">") in the left margin.
Example:
<P>I think it ends <BQ> <P>Soft you now, the fair Ophelia. Nymph, in thy orisons, be all my sins remembered. </BQ> <P>but I am not sure.
HTML defines six heading levels. A heading element implies all the font changes, paragraph breaks before and after, and white space necessary to render the heading. Further character emphasis or paragraph marks are not required in HTML headings.
The heading elements are H1, H2, H3, H4, H5, H6, with H1 being the highest level of heading. For example:
<H1>This is a heading</H1> Here is some text <H2>Second level heading</H2> Here is some more text.
The style of each heading level is up to the designer of the presentation software. Since the rendering software is responsible for generating vertical white space between elements, do not follow a heading element with a paragraph tag.
A typical rendering for headings is:
Parsers should not require any specific order to heading elements, even if the heading level increases by more than one between successive headings.